home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.20041116-20060924 / 000130_fdc@columbia.edu_Tue Jul 19 16:43:09 2005.msg < prev    next >
Internet Message Format  |  2020-01-01  |  4KB

  1. Path: newsmaster.cc.columbia.edu!not-for-mail
  2. From: Frank da Cruz <fdc@columbia.edu>
  3. Newsgroups: comp.protocols.kermit.misc
  4. Subject: Re: tool to interpret packets? and Qs about lineout!
  5. Date: 19 Jul 2005 20:42:27 GMT
  6. Organization: Columbia University
  7. Lines: 80
  8. Message-ID: <slrnddqpdj.jfk.fdc@sesame.cc.columbia.edu>
  9. References: <MpVBe.2319$Q75.431306@newshog.newsread.com> <H7WBe.1111$Na6.495200@twister.nyc.rr.com> <shdDe.2797$S17.567215@monger.newsread.com>
  10. Reply-To: fdc@columbia.edu
  11. NNTP-Posting-Host: sesame.cc.columbia.edu
  12. X-Trace: newsmaster.cc.columbia.edu 1121805747 29939 128.59.59.56 (19 Jul 2005 20:42:27 GMT)
  13. X-Complaints-To: postmaster@columbia.edu
  14. NNTP-Posting-Date: 19 Jul 2005 20:42:27 GMT
  15. User-Agent: slrn/0.9.8.0 (SunOS)
  16. Xref: newsmaster.cc.columbia.edu comp.protocols.kermit.misc:15372
  17.  
  18. On 2005-07-19, Mark <sober@localbar.com> wrote:
  19. : "Jeffrey Altman" <jaltman2@nyc.rr.com> wrote in message 
  20. : news:H7WBe.1111$Na6.495200@twister.nyc.rr.com...
  21. :>> Are there any utilities available (for FreeBSD or dos/windows) which can 
  22. :>> be fed raw packet data and interpret the commands that were issued?
  23. :>> What I'd like to see is the command issued to generate a packet such as:
  24. :>> [soh]0 Iz  @-Y1~@ 5T7[cr]
  25. :>> (and many, many others)
  26. :
  27. You should be able to find a copy of the original Kermit book:
  28.  
  29.   http://www.columbia.edu/kermit/manuals.html#ktb
  30.  
  31. (which went out of print a couple years ago) in a library.  It contains
  32. a specification of the protocol and packet formats.  There have been some
  33. changes since then, but nothing to invalidate what's in the book, at least
  34. not as far as packet format and types are concerned.
  35.  
  36. I'm not sure what you mean by "commands".  If a command such as "send *.zip"
  37. was given, it could result in hundreds, thousands, or millions of packets,
  38. of various types.
  39.  
  40. : I will be using c-kermit for a client but the commands I'm currently
  41. : trying to interpret are embedded in utilities which establish a
  42. : serial connection to a closed system (for purpose of data retrieval).
  43. : Unfortunately, the source is not available and the utilities run on
  44. : the wrong OS... therefore I currently have to run the utilities on 1 OS
  45. : to retrieve data, but then transfer data to another server for processing.
  46. : I'd like to use c-kermit on the processing machine to script the entire
  47. : process so that it may be automated and bypass the need for the
  48. : utilities completely.
  49. :
  50. You should be able to do that.
  51.  
  52. : With a data-scope I'm able to see the packets going back and forth,
  53. : which is why I asked a second question about the lineout command
  54. : (unaswered question follows):
  55. :>> If I were to use the 'lineout' command to output my own 'packet' (i.e.,
  56. :>> header/length/seq/type/data/cksum) would it be interpretted
  57. :>> properly on the other side and be handled accordingly? (assume a properly
  58. :>> formatted packet with a valid command type and data segment)
  59. :
  60. Yes, it is possible to implement the Kermit protocol itself in a Kermit
  61. script, but I'm not aware of anyone actually having done it.  You can see a
  62. trivial example (not the whole protocol, but the use of INPUT and OUTPUT
  63. commands to receive and send a few packets) here:
  64.  
  65.   http://www.columbia.edu/kermit/ckscripts.html#protocol
  66.  
  67. And something similar, a complete implementation of TAP, the alpha pager
  68. protocol which uses packets similar to Kermit's, here:
  69.  
  70.   http://www.columbia.edu/kermit/ckscripts.html#page
  71.  
  72. : If the answer to that question is yes, the next question is:
  73. : how can the lineout command be used to transfer (packet data) commands
  74. : from a disk file?
  75. :
  76. Use FOPEN to open the disk file, FREAD to read data from it into variables,
  77. use LINEOUT to send the contents of the variables.  Brief example:
  78.  
  79.   fopen /read \%c foo.bar
  80.   if fail blah blah
  81.   ...
  82.   fread \%c line
  83.   if fail blah blah
  84.   lineout \m(line)
  85.   ...
  86.   fclose \%c
  87.  
  88. But if this is Kermit protocol then you can't just send the data bare, you
  89. have to encapsulate it in a packet and "encode" it according to the
  90. negotiated options.  Ditto for incoming data.
  91.  
  92. I don't understand enough about your setup to comment further.  But if the
  93. black box is executing Kermit protocol in a standard enough way that you
  94. can communicate with it with C-Kermit, then the task might be simpler than
  95. it appears at the moment.
  96.  
  97. - Frank